<template>
	<view>
		<uni-head title="报案结果"></uni-head>
		<view class="imgbox">
			<image :src="info.state==7?'../../static/Icon/shibai.png':'../../static/Icon/sh.png'" mode=""></image>
		</view>
		<view class="title flex-center">{{info.state==7?'审核失败':'报名审核中'}}</view>
		<view class="info flex-center">{{info.state==7?info.refuse_memo:'您的报案已完成，请及时上传理赔材料'}}</view>
		<view class="butbox flex-center" v-if="info.state==7" @click="goxgai">
			<view class="shibai">去修改</view>	
		</view>
		<view class="butbox flex-center" v-if="info.state==1">
			<view class="shibai" @click="goxgai">报案详情</view>
		</view>
		<!-- <view class="chengg flex-space-between">
			<view class="left">报案详情</view>
			<view class="right">理赔上传</view>
		</view> -->
	</view>
</template>

<script>
	import uniHead from "@/components/uni-dead/head.vue";
	import {chooseImage,IDcard,showToast,navTo} from '@/utils/method.js'
	export default {
		components: { uniHead },
		
		data() {
			return {
				id:'',// 跳转页面，回显数据
				resid:'',//请求当前页面审核是否成功
				info:{},
				isshow:''
			}
		},
		onLoad(obj) {
			console.log(JSON.parse(obj.id));
			this.id=JSON.parse(obj.id).id
			this.resid=JSON.parse(obj.id).resid
			this.reportgetDetail()
		},
		methods: {
			// 判断审核是否成功
			reportgetDetail(){
				this.ajax('report/getDetail',{
					data:{
						id:this.resid
					},
					success:(res)=>{
						console.log(res);
						this.info=res.msg.info
						if(this.info.state==7){
							this.isshow=false
						}else if(this.info.state==1){
							this.isshow=true
						}
					}
				})
			},
			goxgai(){
				let obj={
					id:this.resid,
					type:2
				}
				navTo('/pages/order/registerFrom?obj='+JSON.stringify(obj))
			}
			
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>
<style lang="less" scoped>
.imgbox{
	width: 190upx;
	height: 170upx;
	margin: 242upx auto 44upx; 
	image{
		width: 190upx;
		height: 170upx;
	}
}
.title{
	font-size: 36upx;
	color: #000000;
}
.info{
	font-size: 28upx;
	color: #999999;
	margin:30upx 120upx 42upx;
	text-align: center;
}
.butbox{
	width: 300upx;
	height: 80upx;
	margin: 0 auto;
	color: #5280F8;
	text-align: center;
	line-height: 80upx;
	font-size: 32upx;
	border: 1px solid #5280F8;
	border-radius: 10upx;
}
.chengg{
	margin: 70upx 70upx 0;
	.left,.right{
		width:260upx;
		height: 80upx;
		text-align: center;
		line-height: 80upx;
		font-size: 32upx;
		border-radius: 10upx;
	}
	.left{
		color: #5280F8;
		border: 1px solid #5280F8;
	}
	.right{
		background: linear-gradient(180deg, #4EA5FD 0%, #5280F8 100%);
		color: #fff;
	}
}
</style>
